t = int(input())
dp = [0 for _ in range(int(1e5 + 1))]
count = [[0, 0] for _ in range(int(1e5 + 1))]
count[1] = [0, 1]
count[2] = [1, 1]
MODE = int(1e9 + 7)
for i in range(3, int(1e5 + 1)):
    count[i] = [count[i - 1][0] + count[i - 2][0], count[i - 1][1] + count[i - 2][1]]
    count[i][0] %= MODE
    count[i][1] %= MODE
    dp[i] = dp[i - 1] + dp[i - 2] + count[i - 2][1] * count[i - 1][0]
    dp[i] %= MODE
for _ in range(t):
    c = int(input())
    print(dp[c - 1])
